import mongoose from 'mongoose'

import config from '../../config'
var Schema = mongoose.Schema

const QuestionsSchema = new mongoose.Schema({
  _creator: { type: Number, ref: 'terms' },
  questions_type: { type: String, default: 'normal' },
  questions_name: { type: String, required: true },
  questoins_options: { type: Array },
  questions_true_answers: { type: Array },
  questions_create_time: { type: Date, default: Date.now }

})



QuestionsSchema.methods.method1 = function method1(password) {
  // console.log('~/src/models/terms.js----这里是处理一些业务逻辑层的数据')

  return 'console 方法已经执行'
}





export default mongoose.model('questions', QuestionsSchema)

